﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ERP.Domain.Products
{
    /// <summary>
    /// 产品用料表
    /// </summary>
    [Table("productmaterial")]
    public class ProductMaterial : Audit
    {
        /// <summary>
        /// 自增主键ID
        /// </summary>
        [Key]
        public int Id { get; set; }

        /// <summary>
        /// 产品用料编号（GUID）
        /// </summary>
        public Guid ProductMaterialNumber { get; set; } = Guid.NewGuid();

        /// <summary>
        /// 物料编号
        /// </summary>
        public Guid? MaterialNumber { get; set; }

        /// <summary>
        /// 物料名称
        /// </summary>
        public string MaterialName { get; set; }

        /// <summary>
        /// 规格型号
        /// </summary>
        public string SpecificationModel { get; set; }

        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }

        /// <summary>
        /// 使用量
        /// </summary>
        public int? UsageQuantity { get; set; }

        /// <summary>
        /// 用料比例
        /// </summary>
        public string MaterialRatio { get; set; }

        /// <summary>
        /// 序号（工艺工序序号）
        /// </summary>
        public string SerialNumber { get; set; }

        /// <summary>
        /// 产品编号
        /// </summary>
        public Guid? ProductNumber { get; set; }

        /// <summary>
        /// 逻辑删除
        /// </summary>
        public bool? IsDelete { get; set; } = false;
    }
}
